package com.zd.dao;

import com.zd.entity.Topic;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TopicDao extends CrudRepository<Topic,Long> {
    //查询所有主题
    public List<Topic> getAllBy();
    //根据tid查询主题
    Topic queryTopicByTid(Long tid);
    //查询是否存在某主题
    Topic queryTopicByTname(String tname);
}
